Image correcting apparatus and method, and image correcting program, and look-up table creating apparatus and method, and look-up table creating program

ABSTRACT

A bright luminance value, a dark luminance value, and an average luminance value relating to a face image portion included in an image represented by fed image data are calculated in calculating circuits. Further, a target bright luminance value and a target dark luminance value are calculated in a calculating circuit on the basis of a target average luminance value and a dynamic range that are inputted from an input device and the calculated bright luminance value, dark luminance value, and average luminance value. Interpolation processing based on a correspondence between the calculated bright luminance value, dark luminance value, and average luminance value relating to the face image portion and the target bright luminance value, the target dark luminance value, and the target average luminance value respectively corresponding thereto is performed in a corrected value calculating circuit, to create a look-up table.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image correcting apparatus andmethod for subjecting digital image data to image correction, and aprogram for causing a computer to make image correction. Further, thepresent invention relates to a look-up table creating apparatus andmethod related to the brightness of an image, and a program for creatinga look-up table.

2. Description of the Background Art

Digital image data is subjected to various types of correctionprocessing for the purpose of making an image represented by digitalimage data easy to see and improving the quality of the image, forexample. Concentration correction (luminance correction, brightnesscorrection) which is the one correction processing is for correcting thedigital image data such that the image represented by the digital imagedata becomes brighter when it is dark, while becoming darker when it isbright.

JP-A-2000-196890 describes an image processing apparatus that converts,when the concentration of a subject is not within a target concentrationrange, the gray scale of an image such that the concentration of thesubject will be within the target concentration range in a state wherethe concentrations of the highest concentration portion and the lowestconcentration portion in the image are substantially held. A gray-scalecurve for concentration correction is specifically shown in FIGS. 3 and4.

In the image processing apparatus (concentration correction conformingto the gray-scale curve shown in FIGS. 3 and 4) described inJP-A-2000-196890, the concentration of the subject can be within thetarget concentration range, so that the concentrations of the highestconcentration portion and the lowest concentration portion in the imageare not corrected. Since the possibilities that the concentration of ahighlight portion in the image is reduced and the concentration of ashadow portion in the image is increased are eliminated, the image canbe prevented from having a loose impression.

However, the gray-scale curve not only defines the concentration(brightness, darkness) of the image after correction but also isassociated with high contrast (hard gradation) or low contrast (softgradation) of the image. If the slope of the gray-scale curve is large,a dark portion and a bright portion in the image respectively becomedarker and brighter, so that the image after correction becomes a sharpimage (high contrast, hard gradation). Conversely, when the slope of thegray-scale curve is small, the difference between a dark portion and abright portion in the image becomes small, so that the image aftercorrection has a blurred impression (low contrast, soft gradation).

The image processing apparatus (concentration correction conforming tothe gray-scale curves shown in FIGS. 3 and 4) described inJP-A-2000-196890 does not consider the change in the high contrast orlow contrast of the image. When the concentration correction conforms tothe gray-scale curve shown in FIG. 3, the image after correction alwayshas low contrast with respect to a dark portion (the input concentrationis 0 to 1) in the image, while always having high contrast with respectto a bright portion (the input concentration is 1 to 2) in the image.When the concentration correction conforms to the gray-scale curve shownin FIG. 4, the image after correction always has high contrast withrespect to a dark portion (the input concentration is 0 to 1) in theimage, while always having low contrast with respect to a bright portion(the input concentration is 1 to 2) in the image.

Furthermore, in a case where color prints are produced from images, forexample, represented by digital image data obtained by reading imagesrecorded on photographic negative films or reversal films using ascanner or the like or digital image data acquired by a digital camera,the digital image data may, in some cases, be subjected to brightnesscorrection (luminance correction, concentration correction) such thatthe brightness (luminance, concentration) of a desired subject imageportion such as the face of a character included in a print imagebecomes suitable brightness (luminance, concentration). InJP-A-2000-196890, the face of a character included in the image isextracted, and the image data is subjected to concentration correctionsuch that the average concentration in a face area will be in acorrection target range.

When the image is corrected to higher brightness, however, noiseincluded in the image is liable to be viewed more conspicuously thanthat before correction. That is, consider a case where the entire imageis uniformly subjected to concentration correction (such correction thatthe image becomes brighter) such that the average concentration in adesired subject image portion such as the face of the character includedin the image (the average concentration in the face area) is in thecorrection target range, as in JP-A-2000-196890. In this case, when thedesired subject image portion in the image includes much noise, itbecomes brighter by the concentration correction. However, the noise isconspicuous in the image. If a portion other than the desired subjectimage portion includes noise, the noise is also conspicuous with respectto the portion.

When image data to be processed includes noise, a noise component in theimage data can be removed by using a noise removal filter. However, itis difficult to completely remove the noise. When image data having ahigh resolution (the number of pixels is large when it is displayed) issubjected to noise removal processing, a long processing time period isrequired, so that the resources of a computer device is occupied for along time.

SUMMARY OF THE INVENTION

A first object of the present invention is to allow image correction tobe made in consideration of both the brightness (darkness) and the highcontrast (low contrast) of an image.

A second object of the present invention is to prevent, even if an imageportion to be paid attention to in an image includes noise, the noise inthe image portion to be paid attention to from being conspicuous afterthe image is subjected to brightness (concentration, luminance)correction.

A first invention provides an apparatus for and a method of creating alook-up table used for image correction. The brightness (luminance) ofimage data is corrected on the basis of the look-up table created by thelook-up table creating apparatus and method. In the present invention, aluminance value is used as data representing the brightness of theimage. The luminance value can be uniquely converted into aconcentration value and therefore, can be substituted for theconcentration value in the present invention

The look-up table created by the look-up table creating apparatus andmethod according to the present invention is one in which outputluminance values (corrected values) corresponding to input luminancevalues to be inputted are respectively defined in correspondence withthe input luminance values. The created look-up table can be expressedas a luminance conversion curve (a concentration conversion curve, agray-scale curve) on a graph respectively using the input luminancevalue to enter its horizontal axis and using the output luminance value(corrected value) to enter its vertical axis. The look-up table creatingapparatus according to the present invention can be referred to as anapparatus for creating a luminance conversion curve (a concentrationconversion curve, a gray-scale curve).

A look-up table creating apparatus according to the present invention ischaracterized by comprising representative luminance value calculationmeans for calculating a plurality of representative luminance valuesspaced apart from one another in a particular image included in an imagerepresented by fed image data; corrected luminance valuesetting/calculation means for setting or calculating a plurality ofcorrected luminance values respectively corresponding to the pluralityof representative luminance values that are calculated by therepresentative luminance value calculation means; interpolation meansfor calculating, on the basis of respective correspondences between theplurality of representative luminance values that are calculated by therepresentative luminance value calculation means and the plurality ofcorrected luminance values that are set or calculated by the correctedluminance value setting/calculation means, each of corrected luminancevalues corresponding to luminance values other than the plurality ofrepresentative luminance values by such interpolation that in a casewhere respective correspondences between the representative luminancevalues and the luminance values other than the representative luminancevalues and the corrected luminance values corresponding to the luminancevalues are expressed by a curve, the curve is smooth; and look-up tablecreation means for creating a look-up table on the basis of theplurality of corrected luminance values respectively corresponding tothe plurality of representative luminance values that are set orcalculated by the corrected luminance value setting/calculation meansand the corrected luminance values respectively corresponding to theluminance values other than the plurality of representative luminancevalues that are calculated by the interpolation means.

A look-up table creating method according to the present invention ischaracterized by comprising the steps of calculating a plurality ofrepresentative luminance values spaced apart from one another in aparticular image included in an image represented by fed image data;setting or calculating a plurality of corrected luminance valuesrespectively corresponding to the calculated plurality of representativeluminance values; calculating, on the basis of respectivecorrespondences between the calculated plurality of representativeluminance values and the set or calculated plurality of correctedluminance values, each of corrected luminance values corresponding toluminance values other than the plurality of representative luminancevalues by such interpolation that in a case where respectivecorrespondences between the representative luminance values and theluminance values other than the representative luminance values and thecorrected luminance values corresponding to the luminance values areexpressed by a curve, the curve is smooth; and creating a look-up tableon the basis of the plurality of corrected luminance values respectivelycorresponding to the set or calculated plurality of representativeluminance values and the corrected luminance values respectivelycorresponding to the luminance values other than the calculatedplurality of representative luminance values.

The present invention also provides a program for causing a computer tocarry out the look-up table creating method (causing a computer tofunction as the look-up table creating apparatus). The program accordingto the present invention is for causing a computer to performrepresentative luminance value calculation processing for calculating aplurality of representative luminance values spaced apart from oneanother in a particular image included in an image represented by fedimage data; corrected luminance value setting/calculation processing forsetting or calculating a plurality of corrected luminance valuesrespectively corresponding to the calculated plurality of representativeluminance values; interpolation processing for calculating, on the basisof respective correspondences between the calculated plurality ofrepresentative luminance values and the set or calculated plurality ofcorrected luminance values, each of corrected luminance valuescorresponding to luminance values other than the plurality ofrepresentative luminance values by such interpolation that in a casewhere respective correspondences between the representative luminancevalues and the luminance values other than the representative luminancevalues and the corrected luminance values corresponding to the luminancevalues are expressed by a curve, the curve is smooth; and look-up tablecreation processing for creating a look-up table on the basis of theplurality of corrected luminance values respectively corresponding tothe plurality of representative luminance values that are set orcalculated by the corrected luminance value setting/calculationprocessing and the corrected luminance values respectively correspondingto the luminance values other than the plurality of representativeluminance values that are calculated by the interpolation processing.

An image represented by fed image data (image data read from a film,image data obtained by a digital camera, image data received through anetwork, etc.) shall include a particular image. The particular image isa primary subject image portion in an image to be subjected tobrightness correction (luminance correction), for example, a face imageportion of a character. The particular image is partitioned off(detected) from the image represented by the fed image data on the basisof its shape, its structure, a feature amount for a characteristicelement included in the particular image, a color to be included in theparticular image, and other information.

A plurality of representative luminance values spaced apart from oneanother in the particular image are calculated. The plurality ofrepresentative luminance values spaced apart from one another are aplurality of luminance values out of luminance values for pixelscomposing the particular image, and mean that luminance differencesrespectively exist among the plurality of luminance values. In oneembodiment, at least a bright luminance value (high luminance value), adark luminance value (low luminance value), and an average luminancevalue are calculated as the plurality of representative luminance valuesin the particular image. As described later, in the look-up tablecreating apparatus according to the present invention, on the basis ofrespective correspondences between the calculated plurality ofrepresentative luminance values and the corrected luminance valuescorresponding to the plurality of representative luminance values, thecorrected luminance values corresponding to the luminance values otherthan the calculated plurality of representative luminance values arecalculated by interpolation. In order to improve the precision ofinterpolation processing, therefore, it is preferable that manyrepresentative luminance values (and corrected luminance valuescorresponding to the representative luminance values) are calculated.However, interpolation processing with relatively high precision can berealized by using respective correspondences between at least the threerepresentative luminance values (e.g., the bright luminance value, thedark luminance value, and the average luminance value, described above)spaced apart from one another (not continuous) and corrected luminancevalues corresponding to the representative luminance values.

When the bright luminance value, the dark luminance value, and theaverage luminance value are used as the plurality of representativeluminance values in the particular image, the highest luminance valueand the lowest luminance value out of the luminance values of the pixelscomposing the particular image can be respectively taken as the brightluminance value and the dark luminance value. Usable as the averageluminance value are an average value, an intermediate value, or a mostfrequency value out of the luminance values of the pixels composing theparticular image.

A histogram based on luminance values in the particular image may beused, to take the luminance value that accounts for a predeterminedpercentage of the total area from the highest luminance value in thehistogram as the bright luminance value in the particular image and takethe luminance value that accounts for a predetermined percentage of thetotal area from the lowest luminance value in the histogram as the darkluminance value in the particular image. In this case, the look-up tablecreating apparatus further comprises particular image histogram creationmeans for creating the histogram based on the luminance values for thepixels included in the particular image.

The plurality of corrected luminance values respectively correspondingto the calculated plurality of representative luminance values are setor calculated. The corrected luminance value may be set (set by anoperator of the look-up table creating apparatus) with respect to eachof the calculated plurality of representative luminance values.Alternatively, the corrected luminance values may be set (inputted) withrespect to any one or more of the plurality of corrected luminancevalues, and the remaining corrected luminance values may beautomatically calculated.

For example, the plurality of representative luminance values in theparticular image are a bright luminance value, a dark luminance value,and an average luminance value. When the corrected luminance valuesrespectively corresponding to the bright luminance value, the darkluminance value, and the average luminance value (the corrected brightluminance value, the corrected dark luminance value, and the correctedaverage luminance value) are determined, the corrected bright luminancevalue, the corrected dark luminance value, and the corrected averageluminance value can be determined in the following manner.

In one embodiment, the corrected average luminance value correspondingto the average luminance value and a dynamic range (a first dynamicrange) between the corrected bright luminance value that shouldcorrespond to the bright luminance value and the corrected darkluminance value that should correspond to the dark luminance value areinputted (set) (input means is further provided). In the correctedluminance value setting/calculation means, the corrected brightluminance value corresponding to the bright luminance value and thecorrected dark luminance value corresponding to the dark luminance valueare calculated on the basis of the inputted corrected average luminancevalue and dynamic range (first dynamic range) and the bright luminancevalue, the dark luminance value, and the average luminance value thatare calculated by the representative luminance value calculation means.The set value (input value) is used as the corrected average luminancevalue corresponding to the average luminance value, and the correctedbright luminance value corresponding to the bright luminance value andthe corrected dark luminance value corresponding to the dark luminancevalue are calculated on the basis of the set (inputted) averageluminance value, the dynamic range (first dynamic range) between thecorrected bright luminance value which should correspond to the brightluminance value and the corrected dark luminance value which shouldcorrespond to the dark luminance value and the bright luminance value,the dark luminance value, and the average luminance value that arecalculated by the representative luminance value calculation means.

In another embodiment, the corrected average luminance valuecorresponding to the average luminance value and a dynamic range (seconddynamic range) between the corrected bright luminance value that shouldcorrespond to the bright luminance value and the corrected averageluminance value are inputted (set) (input means is further provided). Inthe corrected luminance value setting/calculation means, the correctedbright luminance value corresponding to the bright luminance value andthe corrected dark luminance value corresponding to the dark luminancevalue are calculated on the basis of the inputted corrected averageluminance value and dynamic range (second dynamic range) and the brightluminance value, the dark luminance value, and the average luminancevalue that are calculated by the representative luminance valuecalculation means. The set value (input value) is used as the correctedaverage luminance value corresponding to the average luminance value,and the corrected bright luminance value corresponding to the brightluminance value and the corrected dark luminance value corresponding tothe dark luminance value are calculated on the basis of the set(inputted) corrected average luminance value, the dynamic range (seconddynamic range) between the corrected bright luminance value which shouldcorrespond to the bright luminance value and the corrected averageluminance value, and the bright luminance value, the dark luminancevalue, and the average luminance value that are calculated by therepresentative luminance value calculation means.

In still another embodiment, the corrected average luminance valuecorresponding to the average luminance value and a dynamic range (athird dynamic range) between the corrected average luminance value andthe corrected dark luminance value that should correspond to the darkluminance value are inputted (set) (input means is further provided). Inthe corrected luminance value setting/calculation mean, the correctedbright luminance value corresponding to the bright luminance value andthe corrected dark luminance value corresponding to the dark luminancevalue are calculated on the basis of the inputted corrected averageluminance value and dynamic range (third dynamic range) and the brightluminance value, the dark luminance value, and the average luminancevalue that are calculated by the representative luminance valuecalculation means. The set value (input value) is used as the correctedaverage luminance value corresponding to the average luminance value,the corrected bright luminance value corresponding to the brightluminance value and the corrected dark luminance value corresponding tothe dark luminance value are calculated on the basis of the set(inputted) corrected average luminance value, the dynamic range (thirddynamic range) between the corrected average luminance value and thecorrected dark luminance value that should correspond to the darkluminance value and the bright luminance value, the dark luminancevalue, and the average luminance value that are calculated by therepresentative luminance value calculation means.

In any one of the three embodiments, the corrected bright luminancevalue and the corrected dark luminance value may be calculated such thatthe ratio of the luminance difference between the bright luminance valueand the average luminance value to the luminance difference between thebright luminance value and the dark luminance value is equal to theratio of the luminance difference between the corrected bright luminancevalue and the corrected average luminance value to the luminancedifference between the corrected bright luminance value and thecorrected dark luminance value, and the ratio of the luminancedifference between the average luminance value and the dark luminancevalue to the luminance difference between the bright luminance value andthe dark luminance value is equal to the ratio of the luminancedifference between the corrected average luminance value and thecorrected dark luminance value to the luminance difference between thecorrected bright luminance value and the corrected dark luminance value.Since the ratio of the luminance difference between the bright luminancevalue and the average luminance value to the luminance differencebetween the average luminance value and the dark luminance value in theparticular image is equal to the ratio of the luminance differencebetween the corrected bright luminance value and the corrected averageluminance value to the luminance difference between the correctedaverage luminance value and the corrected dark luminance value, thebrightness of the particular image included in the image represented bythe fed image data is emphasized as it is.

As described in the foregoing, the respective correspondences betweenthe plurality of representative luminance values that are calculated bythe representative luminance value calculation means and the pluralityof corrected luminance values that are set or calculated by thecorrected luminance value setting/calculation means are found.

Each of the corrected luminance values corresponding to the luminancevalues other than the plurality of representative luminance values iscalculated by such interpolation that in a case where the respectivecorrespondences between the representative luminance values and theluminance values other than the representative luminance values and thecorrected luminance values corresponding to the luminance values areexpressed by a curve, the curve is smooth.

For example, assuming that the luminance value is represented by 8-bitdata, the luminance value can be represented at 256 levels from 0 to255. By the interpolation, the corrected luminance values respectivelycorresponding to the luminance values other than the calculatedplurality of representative luminance values out of the luminance valuesat 256 levels are calculated. It is possible to utilize, for suchinterpolation processing that in a case where respective correspondencesbetween the representative luminance values and the luminance valuesother than the representative luminance values and the correctedluminance values corresponding to the luminance values are expressed bya curve, the curve is smooth, a spline interpolation method, a nearestneighbor method, a by-linear method, a by-cubic method, etc.

A look-up table is created on the basis of the plurality of correctedluminance values respectively corresponding to the plurality ofrepresentative luminance values that are set or calculated by thecorrected luminance value setting/calculation means and the correctedluminance values respectively corresponding to the luminance valuesother than the plurality of representative luminance values that arecalculated by the interpolation means. When the luminance value isrepresented at 256 levels from 0 to 255, respective correspondencesbetween the luminance values at 256 levels (256 luminance valuesincluding the plurality of representative luminance values) andcorrected luminance values corresponding thereto are stored in thecreated look-up table. As described above, the look-up table can beexpressed as a luminance conversion curve (a concentration conversioncurve or a gray-scale curve) on the graph respectively using the inputluminance value to enter its horizontal axis and using the outputluminance value (corrected value) to enter its vertical axis. Theluminance conversion curve passes through all intersections between theplurality of representative luminance values and the plurality ofcorrected luminance values corresponding thereto and is drawn as asmooth curve.

According to the present invention, the created look-up table stores theplurality of representative luminance values spaced apart from oneanother in the particular image included in the image represented by thefed image data and the desired corrected luminance values respectivelycorresponding to the plurality of representative luminance values.Further, the corrected luminance values corresponding to the luminancevalues other than the representative luminance values are calculated bysuch interpolation processing that in a case where respectivecorrespondences between the representative luminance values and theluminance values other than the representative luminance values and thecorrected luminance values corresponding thereto are expressed by acurve, the curve is smooth. By using the created look-up table(luminance conversion curve), therefore, at least the brightness(luminance value) for the particular image can be corrected (converted)to the desired luminance value, and the high contrast (or low contrast)of the particular image represented by the image data after luminancecorrection can be changed to one meeting the high contrast (or lowcontrast) of the particular image represented by the fed image data.

The high contrast (or the low contrast) of the image including theparticular image after luminance correction conforms to the slope of theluminance conversion curve in a case where the created look-up table isrepresented by the luminance conversion curve. When the slope of theluminance conversion curve is large, a dark portion and a bright portionin the image respectively become darker and brighter. Accordingly, theimage after correction becomes a sharp image (high contrast, hardgradation). Conversely, when the slope of the luminance conversion curveis small, the difference between the dark portion and the bright portionin the image is decreased, so that the image becomes an image having ablurred impression (low contrast, soft gradation). The high contrast(low contrast) in the particular image after luminance correction (theslope of the luminance conversion curve in the luminance rangecorresponding to the particular image) can be changed by theabove-mentioned dynamic ranges (first to third dynamic ranges). That is,when a large range is set as each of the first to third dynamic ranges,the luminance difference between the corrected bright luminance valueand the corrected dark luminance value is increased, and the slope ofthe luminance conversion curve in the luminance range corresponding tothe particular image is increased, so that the particular image afterluminance correction has high contrast. Conversely, when a small rangeis set as each of the first to third dynamic ranges, the luminancedifference between the corrected bright luminance value and thecorrected dark luminance value is decreased, and the slope of theluminance conversion curve in the luminance range corresponding to theparticular image is decreased, so that the particular image afterluminance correction has low contrast. By setting the dynamic ranges(first to third dynamic ranges), the particular image after correctionhaving high contrast (or low contrast) meeting a user's taste can beobtained. The dynamic range is inputted, and the corrected value of theaverage luminance value (corrected average luminance value) is alsoinputted. Accordingly, the particular image after correction has highcontrast (or low contrast) meeting the user's taste and has brightness(luminance value) meeting the user's taste.

In the preferred embodiment, the interpolation means uses the lowestluminance value as it is as the corrected lowest luminance valuecorresponding to the lowest luminance value (“0” in the case of eightbits) that can be taken as a luminance value and uses the highestluminance value as it is as the corrected highest luminance valuecorresponding to the highest luminance value (“255” in the case of eightbits) that can be taken as a luminance value, and respectivelycalculates the respective corrected luminance values corresponding toluminance values other than the lowest luminance value, the darkluminance value, the average luminance value, the bright luminancevalue, and the highest luminance value on the basis of fivecorrespondences of the corrected lowest luminance value corresponding tothe lowest luminance value, the corrected dark luminance valuecorresponding to the dark luminance value, the corrected averageluminance value corresponding to the average luminance value, thecorrected bright luminance value corresponding to the bright luminancevalue, and the corrected highest luminance value corresponding to thehighest luminance value. When the luminance of the entire imagerepresented by the fed image data is corrected, the high contrast (orthe low contrast) of the entire image after luminance conversion can bechanged to one meeting the high contrast (or the low contrast) of theimage represented by the fed image data.

There may be further provided entire image histogram creation means forcreating a histogram based on luminance values for pixels included inthe image represented by fed image data. The interpolation means may usethe histogram created by the entire image histogram creation means, tocalculate the luminance value that accounts for a predeterminedpercentage of the total area from the lowest luminance value in thehistogram as the lowest luminance value in the entire image, whilecalculating the luminance value that accounts for a predeterminedpercentage of the total area from the highest luminance value in thehistogram as the highest luminance value in the entire image, make thelowest luminance value (“0” in the case of eight bits) that can be takenas a luminance value correspond as the corrected lowest luminance valuecorresponding to the calculated lowest luminance value in the entireimage and make the highest luminance value (“255” in the case of eightbits) that can be taken as a luminance value correspond as the correctedhighest luminance value corresponding to the calculated highestluminance value in the entire image, and calculate the respectivecorrected luminance values corresponding to the luminance values otherthan the lowest luminance value, the dark luminance value, the averageluminance value, the bright luminance value, and the highest luminancevalue from the lowest luminance value in the entire image to the highestluminance value in the entire image on the basis of five correspondencesof the corrected lowest luminance value corresponding to the lowestluminance value in the entire image, the corrected dark luminance valuecorresponding to the dark luminance value, the corrected averageluminance value corresponding to the average luminance value, thecorrected bright luminance value corresponding to the bright luminancevalue, and the highest luminance value in the entire image.

Of course, the histogram may be used, to calculate either one of thelowest luminance value and the highest luminance value in the entireimage and to make the lowest luminance value or the highest luminancevalue that can be taken as a luminance value correspond as a correctedluminance value corresponding to the calculated lowest luminance valueor highest luminance value in the entire image. With respect to thehighest luminance value or the lowest luminance value that is notcalculated, the highest luminance value or the lowest luminance valuethat can be taken as a luminance value is made to correspond as acorrected highest luminance value or a corrected lowest luminance value.

A second invention provides an apparatus for and a method of correctingthe brightness (luminance) of image data that is at least a part of fedimage data. In the present invention, a luminance value is used as datarepresenting the brightness of an image. Since the luminance value canbe uniquely converted into a concentration value, the luminance valuecan be substituted for a concentration value in the present invention

An image correcting apparatus according to the present invention ischaracterized by comprising representative luminance value calculationmeans for calculating a representative luminance value in a particularimage included in an image represented by fed image data; noise amountcalculation means for calculating a noise amount included in particularimage data representing the particular image; target luminance valuedetermination means for determining a target luminance value dependingon the noise amount calculated by the noise amount calculation means;means for producing data representing a luminance conversion straightline or a luminance conversion curve such that the represented luminancevalue calculated by the representative luminance value calculation meansis corrected to the target luminance value determined by the targetluminance value determination means; and luminance correction means forcorrecting the luminance of at least the particular image datarepresenting the particular image on the basis of the produced datarepresenting the luminance conversion straight line and the luminanceconversion curve.

A image correcting method according to the present invention ischaracterized by comprising the steps of calculating a representativeluminance value in a particular image included in an image representedby fed image data; calculating a noise amount included in particularimage data representing the particular image; determining a targetluminance value depending on the calculated noise amount; producing datarepresenting a luminance conversion straight line or a luminanceconversion curve such that the calculated representative luminance valueis corrected to the determined target luminance value; and correctingthe luminance of at least the particular image data representing theparticular image on the basis of the produced data representing theluminance conversion straight line or the luminance conversion curve.

Examples of digital image data to be fed include digital image dataobtained by reading an image read on a photographic negative film or areversal film using a scanner or the like, and digital image dataacquired by a digital camera, a camera phone, a PDA (Personal DigitalAssistant) with a camera, etc. The digital image data obtained by thescanner, the digital camera, the camera phone, the PDA with a camera, orthe like is fed to the image correcting apparatus.

A particular image means an image portion (an image area) having aparticular structure, shape, color, etc. that is included in an imagerepresented by fed image data. The particular image includes not only apartial image area included in an image represented by fed image databut also the entire image represented by the fed image data. Examples ofthe particular image include images representing the face, body, hands,legs, etc. of a character, the face of an animal (cat, dog, monkey,chicken, flog, snake, etc.), a flower petal or a leaf in a plant(cherry, rose, Japanese plum, etc.), a main object (Mount Fuji, moon,temple, etc.) in a background, and a structure (an automobile, etc.).The particular image has a particular structure, shape, color, etc.Accordingly, it is possible to detect (partition, extract) image datarepresenting a particular image (particular image data) from fed imagedata (image data representing the entire image).

The representative luminance value in the particular image is a valuerepresenting the luminance value in the particular image. In oneembodiment, an average of the respective luminance values of a pluralityof pixels composing the particular image can be used as a representativeluminance value. Of course, an intermediate value or a most frequentvalue may be used as a representative luminance value.

To digital image data, noise generated by the effect of an electroniccomponent mounted inside a camera, noise generated when an imagerecorded on a photographic negative film or a reversal film is read by ascanner or the like, noise captured by a lens, noise generated by imageprocessing, etc. may, in some cases, be added. The amount of the noiseincluded in the particular image data is calculated by the noise amountcalculation means.

A target luminance value is determined depending on the noise amountincluded in the calculated particular image data. That is, thedetermined target luminance value varies depending on the noise amountincluded in the particular image data.

Data representing a luminance conversion straight line or a luminanceconversion curve is produced such that the calculated representativeluminance value is corrected to the determined target luminance value,and the luminance of at least the particular image data representing theparticular image is corrected on the basis of the produced datarepresenting the luminance conversion straight line or the luminanceconversion curve.

The data representing the luminance conversion straight line or theluminance conversion curve is produced such that the representativeluminance value is corrected to a target luminance value. That is, apixel having the representative luminance value obtained from theparticular image data included in the image data before luminancecorrection is corrected so as to have the target luminance value byluminance correction processing based on the produced data representingthe luminance conversion straight line or the luminance conversioncurve.

The luminance of a pixel having a luminance value other than therepresentative luminance value is corrected on the basis of the produceddata representing the luminance conversion straight line or theluminance conversion curve. The luminance conversion straight line orthe luminance conversion curve is produced on the basis of acorrespondence between the representative luminance value and the targetluminance value. For example, in a graph representing an input/outputrelationship between the input luminance value and the output luminancevalue, it is possible to produce a luminance conversion straight linepassing through an intersection between the representative luminancevalue (that is an input luminance value) and the target luminance value(that is an output luminance value) and an origin (a point at which anoutput luminance value corresponding to an input luminance value “0” is“0”). It is possible to also produce a luminance conversion curvepassing through three points, i.e., an intersection between therepresentative luminance value and the target luminance value, anorigin, and a corresponding point of the maximum luminance values (e.g.,a point at which an output luminance value corresponding to an inputluminance value “255” is “255”). In either case, the produced datarepresenting the luminance conversion straight line or the luminanceconversion curve defines not only a correspondence between therepresentative luminance value and the target luminance value but also acorrespondence between the other input luminance value and the otheroutput luminance value.

According to the present invention, a target luminance value isdetermined depending on a noise amount in a particular image included inan image represented by fed image data (included in particular imagedata), and the determined target luminance value is taken as a correctedvalue of a representative luminance value. The representative luminancevalue (corrected value) is calculated depending on the noise amount,thereby realizing correction of a luminance value (concentration,brightness) conforming to the noise amount. The luminance value iscorrected after considering the noise amount, thereby making it possibleto correct the luminance value (concentration, brightness) of theparticular image in such a manner that noise in an image aftercorrection (particularly, a particular image) is not conspicuous.

In one embodiment, the image correcting apparatus further comprisesdesired target luminance value input means for accepting input of adesired target luminance value, and predicted noise amount calculationmeans for calculating a predicted noise amount that may be included inthe particular image data after luminance correction on the basis of therepresentative luminance value calculated by the representativeluminance value calculation means, the desired target luminance valueinputted by the target luminance value input means, and the noise amountcalculated by the noise amount calculation means. The target luminancevalue determination means determines the target luminance valuedepending on the predicted noise amount calculated by the predictednoise amount calculation means.

In place of the noise amount in the particular image included in theimage represented by the fed image data, a noise amount in theparticular image in a case where it is assumed that luminance correctionhas been made (a predicted noise amount) is used for determining thetarget luminance value. The noise in the particular image can beprevented from being conspicuous after luminance correction bydetermining the target luminance value using the predicted noise amountand producing data representing a luminance conversion straight line ora luminance conversion curve on the basis of the target luminance valueusing the determined predicted noise amount.

Preferably, the target luminance value determination means determines,on the basis of an allowable noise amount for noise that may be includedin the particular image data after luminance correction and thecalculated noise amount or predicted noise amount, that are previouslyset or inputted, the target luminance value such that the noise amountor the predicted noise amount becomes not more than the allowable noiseamount. The allowable noise amount can be set or inputted, and thetarget luminance value is determined depending on the allowable noiseamount, so that luminance correction conforming to allowance of a userto noise is made.

In one embodiment, the target luminance value determination meansdetermines the desired target luminance value inputted from the desiredtarget luminance value input means as a target luminance value when thecalculated predicted noise amount is not more than the allowable noiseamount, and calculates, when the calculated predicted noise amountexceeds the allowable noise amount, such a new target luminance valuethat the predicted noise amount takes the same value as the allowablenoise amount on the basis of the representative luminance value, theallowable noise amount, and the noise amount, and determines thecalculated new target luminance value as the target luminance value.When the calculated predicted noise amount is not more than theallowable noise amount, luminance correction meeting a user's desire isrealized. Further, the particular image after luminance correctionincludes noise whose amount is always not more than the allowable noiseamount, so that a user's request for the noise is reliably satisfied.Further, when the predicted noise amount exceeds the allowable noiseamount, such a new target luminance value that the predicted noiseamount is the same as the allowable noise amount is calculated on thebasis of the representative luminance value, the allowable noise amount,and the noise amount, thereby making it possible to calculate such atarget luminance value that the representative luminance value is notvaried as much as possible while reliably satisfying the user's requestfor the noise.

The present invention also provides a program for causing a computer toperform image correction processing (a program for causing a computer tofunction as an image correcting apparatus).

The foregoing and other objects, features, aspects and advantages of thepresent invention will become more apparent from the following detaileddescription of the present invention when taken in conjunction with theaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing the entire configuration of a digitalprinting system according to a first embodiment;

FIG. 2 is a block diagram showing the detailed electrical configurationof an image correcting apparatus in the first embodiment, together withthe flow of data;

FIG. 3(A) illustrates an example of an image represented by input imagedata, FIG. 3(B) shows how a face image portion is partitioned off(detected), and FIG. 3(C) shows a mask image;

FIG. 4 shows a histogram based on luminance values in a face imageportion;

FIG. 5 shows an example of a screen for setting a target averageluminance value relating to a face image portion, and a dynamic range(DL) between a target bright luminance value and a target dark luminancevalue;

FIG. 6 shows a look-up table;

FIG. 7 shows the relationship between an input luminance value and anoutput luminance value (corrected value);

FIG. 8 shows the relationship between an input luminance value and anoutput luminance value (corrected value) using a luminance conversioncurve;

FIG. 9 shows another example of a luminance conversion curverepresenting the relationship between an input luminance value and anoutput luminance value (corrected value);

FIG. 10 is a block diagram showing the electrical configuration of adigital printing system according to a second embodiment;

FIG. 11 is a block diagram showing the electrical configuration of animage correcting apparatus in the second embodiment;

FIG. 12 shows an example of a filter used for noise calculationprocessing;

FIG. 13 shows a luminance conversion straight line;

FIG. 14 is a block diagram showing the electrical configuration of animage correcting apparatus in a modified example of the secondembodiment; and

FIG. 15 shows a luminance conversion curve.

DESCRIPTION OF THE PREFERRED EMBODIMENTS First Embodiment

FIG. 1 is a block diagram showing the entire configuration of a digitalprinting system. The digital printing system comprises an imagecorrecting apparatus 1, and peripheral equipment (an input device 2, adisplay device 3, a storage device 4, and a printer 5) connected to theimage correcting apparatus 1. FIG. 2 is a block diagram showing thedetailed electrical configuration of the image correcting apparatus 1that is a core apparatus in the digital printing system, together withthe flow of data. In FIG. 2, the illustration of the display device 3and the printer 5 in the peripheral equipment shown in FIG. 1 isomitted.

The image correcting apparatus 1 is an apparatus for correctingbrightness (luminance value) (any one of 256 luminance values from 0 to255) for each pixel in a portion representing the face of a characterincluded in an image represented by fed image data (hereinafter referredto as a face image portion) to more preferable brightness (luminancevalue) (any one of 256 luminance values from 0 to 255) as well assuitably controlling the high contrast (hard gradation) and low contrast(soft gradation) of the entire image. An input device 2 (a keyboard, amouse, etc.) connected to the image correcting apparatus 1 is used forinput of a plurality of parameters (described later), for example, forimage correction processing. On a display screen of the display device3, a screen for setting the parameters inputted from the input device 2,images represented by image data before and after correction, and soforth are displayed. The storage device (a hard disk, a memory card, aCD-ROM, etc.) 4 stores image data. The image data read out of thestorage device 4 is subjected to image correction processing in theimage correcting apparatus 1. The printer 5 prints the image representedby the image data after correction on printing paper or the like.

The image correcting apparatus 1 comprises a face area partitioningcircuit 11, a bright luminance value and dark luminance valuecalculating circuit 12, an average luminance value calculating circuit13, a target bright luminance value and target dark luminance valuecalculating circuit 14, a corrected value calculating circuit (look-uptable creating circuit) 15, and an image correcting circuit 16.

The image data read out of the storage device 4 connected to the imagecorrecting apparatus 1 is subjected to image correction in the imagecorrecting circuit 16. The image correction processing performed in theimage correcting circuit 16 conforms to a corrected value table (look-uptable), which defines a correspondence between an input luminance valueand an output luminance value (corrected value), calculated (created) inthe corrected value calculating circuit (look-up table creating circuit)15. The look-up table can be expressed as a luminance conversion curve(gray-scale curve).

A bright luminance value relating to the face image portion, a darkluminance value relating to the face image portion, an average luminancevalue relating to the face image portion, a target average luminancevalue (corrected average luminance value) relating to the face imageportion, a target bright luminance value (corrected bright luminancevalue) relating to the face image portion, and a target dark luminancevalue (corrected dark luminance value) relating to the face imageportion (the six luminance values will be described in detail later) aregiven to the corrected value calculating circuit (look-up table creatingcircuit) 15. The corrected value calculating circuit (look-up tablecreating circuit) 15 calculates (creates) the corrected value table(look-up table) on the basis of the values.

First, description is made of calculation processing (acquisitionprocessing) of the bright luminance value relating to the face imageportion, the dark luminance value relating to the face image portion,and the average luminance value relating to the face image portion. Theface area partitioning circuit 11, the bright luminance value and darkluminance value calculating circuit 12, and the average luminance valuecalculating circuit 13 are used for calculating the three luminancevalues.

An image represented by image data to be subjected to correctionprocessing shall include an image portion representing the face of acharacter (a face image portion). The image data representing the imageincluding the face image portion is read out of the storage device 4.

The image data read out of the storage device 4 is inputted to each ofthe face area partitioning circuit 11, the bright luminance value anddark luminance value calculating circuit 12, and the average luminancevalue calculating circuit 13.

The face area partitioning circuit 11 is a circuit for partitioning offthe face image portion included in the image (hereinafter referred to asinput image) represented by the inputted image data (hereinafterreferred to as input image data) from the other image portion (fordetecting the face image portion or defining a boundary).

Various types of conventional or new partitioning (detecting) methodscan be used for processing for partitioning off a face image portionincluded in an image. For example, a method of decomposing an image intoa plurality of areas and partitioning off (detecting) a face imageportion utilizing a two-dimensional histogram relating to hue andsaturation obtained for each of the areas obtained by the decomposition(JP-A-5-100328), a method of partitioning off (detecting) a face imageportion from the other image portion by pattern matching(JP-A-8-122944), and a method of partitioning off (detecting) a faceimage portion by detecting a skin candidate area in an image anddetecting main face features (eyes, eyebrows, hair, nose, and mouth) inthe detected skin candidate area to partition off (detect) the faceimage portion (JP-A-2002-203239), and a method of setting a leaningframe in an image, leaning image data representing an image portiondefined by the leaning frame, to extract one or a plurality ofrepresentative feature vectors representing the leaning frame, setting asearch frame within the same image, and extracting a face image portionfrom the search frame on the basis of the degrees of similarity betweeneach of the representative feature vectors and a plurality of featurevectors extracted from the image data representing the image portiondefined by the search frame (JP-A-2004-220555).

The face area partitioning circuit 11 outputs binary data (data to which1 or 0 corresponds for each pixel address) taking each of pixelsincluded in the partitioned (detected) face image portion (within a faceimage area) as one (or zero) and taking each of pixels included in theimage portion other than the face image portion (outside the face imagearea) as zero (or one). FIGS. 3(A), 3(B), and 3(C) schematically show animage represented by input image data, how a face image portion ispartitioned off (detected) by the face area partitioning circuit 11, andbinary data (mask data) outputted from the face area partitioningcircuit 11 taking each of pixels included in the face image portion asone and taking each of pixels included in the image portion other thanthe face image portion as zero, respectively.

The binary data outputted from the face area partitioning circuit 11defines a position and a range (an area position) of the face imageportion included in the input image. The binary data outputted from theface area partitioning circuit 11 is referred to as face areainformation.

The face area information outputted from the face area partitioningcircuit 11 is inputted to each of the bright luminance value and darkluminance value calculating circuit 12 and the average luminance valuecalculating circuit 13.

The bright luminance value and dark luminance value calculating circuit12 calculates, out of luminance values for pixels composing the faceimage portion included in the input image, the largest luminance valueand the smallest luminance value. As described above, the input imagedata representing the input image is fed to the bright luminance valueand dark luminance value calculating circuit 12 from the storage device4. The area position of the face image portion included in the inputimage is specified by the face area information outputted from the facearea partitioning circuit 11.

Although the largest luminance value and the smallest luminance valuebut of the luminance values for the pixels composing the face imageportion can be simply employed as a bright luminance value (Yhl) and adark luminance value (Ysd), a singular (inaccurate) luminance value may,in some cases, exist due to the effect of noise or the like depending onthe input image. In order to prevent the singular (inaccurate) luminancevalue from being determined as a bright luminance value or a darkluminance value, a histogram is created using the luminance values forthe pixels composing the face image portion in the bright luminancevalue and dark luminance value calculating circuit 12. In the histogram,a luminance value that accounts for 1% of the total area from thelargest luminance value is calculated as the bright luminance value(Yhl), and a luminance value that accounts for 1% of the total area fromthe smallest luminance value is calculated as the dark luminance value(Ysd) (see FIG. 4). Even if the pixel having the singular (inaccurate)luminance value exists, the luminance value can be prevented from beingdetermined as a bright luminance value or a dark luminance value.

The average luminance value calculating circuit 13 calculates an averageof the luminance values for the pixels composing the face image portionincluded in the input image. The calculated average value is an averageluminance value (Yave). The average luminance value (Tave) is calculatedby the following equation 1:

(ΣYi)/n  equation 1

Here, Yi and n respectively indicate the luminance value for each of thepixels composing the face image portion and the number of pixelscomposing the face image portion.

In place of the average value, an intermediate value or a most frequentvalue may be used as the average luminance value (Yave).

The bright luminance value (Yhl) and the dark luminance value (Ysd) thatare calculated in the bright luminance value and dark luminance valuecalculating circuit 12 and the average luminance value (Yave) calculatedin the average luminance value calculating circuit 13 are respectivelyinputted to the corrected value calculating circuit (look-up tablecreating circuit) 15 and the target bright luminance value and targetdark luminance value calculating circuit 14.

A target average luminance value, a target bright luminance value, and atarget dark luminance value relating to the face image portion, togetherwith the bright luminance value (Yhl), the dark luminance value (Ysd),and the average luminance value (Yave) relating to the face imageportion obtained in the above-mentioned manner, are also given to thecorrected value calculating circuit (look-up table creating circuit) 15.A value inputted by an operator from the input device 2 is used as thetarget average luminance value. The target bright luminance value andthe target dark luminance value are calculated in the target brightluminance value and target dark luminance value calculating circuit 14.

A target average luminance value (Ytarget) is inputted to the inputdevice 2 by the operator of the image correcting apparatus 1. The targetaverage luminance value (Ytarget) becomes a corrected value of theaverage luminance value (Yave) obtained from the face image portion (thetarget average luminance value (Ytarget) is stored as a valuecorresponding to the average luminance value (Yave) in the look-uptable). A target bright luminance value (Ytarget_hl) and a target darkluminance value (Ytarget_sd), described below, respectively becomecorrected values of the bright luminance value (Yhl) and the darkluminance value (Ysd) that are obtained from the face image portion.

A dynamic range (DL) between the target bright luminance value and thetarget dark luminance value, together with the target average luminancevalue (Ytarget), is also inputted from the input device 2. The targetaverage luminance value (Ytarget) and the dynamic range (DL) between thetarget bright luminance value and the target dark luminance value arefed to the target bright luminance value and target dark luminance valuecalculating circuit 14. FIG. 5 illustrates an example of a screen forsetting the target average luminance value (Ytarget) and the dynamicrange (DL) between the target bright luminance value and the target darkluminance value, which is displayed on the display screen of the displaydevice 3. A slide bar a is operated by a mouse, to set the targetaverage luminance value (Ytarget). A slide bar b is operated by themouse, to set the dynamic range (DL) between the target bright luminancevalue and the target dark luminance value.

As described above, the bright luminance value (Yhl) and the darkluminance value (Ysd) that are calculated in the bright luminance valueand dark luminance value calculating circuit 12 and the averageluminance value (Yave) calculated in the average luminance valuecalculating circuit 13 are also fed to the target bright luminance valueand target dark luminance value calculating circuit 14. As describedbelow, the target bright luminance value and target dark luminance valuecalculating circuit 14 utilizes the target average luminance value(Ytarget) and the dynamic range (DL) between the target bright luminancevalue and the target dark luminance value that are inputted from theinput device 2, the bright luminance value (Yhl) and the dark luminancevalue (Ysd) that are calculated in the bright luminance value and darkluminance value calculating circuit 12, and the average luminance value(Yave) calculated in the average luminance value calculating circuit 13,to calculate the target bright luminance value (Ytarget_hl) and thetarget dark luminance value (Ytarget_hl).

The target bright luminance value (Ytarget_hl) is calculated by thefollowing equation 2:

Ytarget_(—) hl=Yave+DLhl  equation 2

-   -   Ytarget_hl: Target bright luminance value        -   Yave: Average luminance value        -   DLhl: Dynamic range between target bright luminance value            and target average luminance value

The target dark luminance (Ytarget_sd) is calculated by the followingequation 3:

Ytarget_(—) sd=Yave−DLsd  equation 3

-   -   Ytarget_sd: Target dark luminance value        -   DLsd: Dynamic range between target average luminance value            and target dark luminance value

Here, the dynamic range (DLhl) between the target bright luminance valueand the target average luminance value, which is used in the equation 2,is calculated by the following equation 4:

DLhl=DL·(Yhl−Yave)/(Yhl−Ysd)  equation 4

-   -   DL: Dynamic range between target bright luminance value and        target dark luminance value    -   Yhl: Bright luminance value    -   Yave: Average luminance value    -   Ysd: Dark luminance value

The dynamic range (DLsd) between the target average luminance value andthe target dark luminance value, which is used in the equation 3, iscalculated by the following equation 5:

DLsd=DL·(Yave−Ysd)/(Yhl−Ysd)  equation 5

The equations 4 and 5 will be supplementarily described with referenceto FIG. 7. The dynamic range (DLhl) between the target bright luminancevalue and the target average luminance value (equation 4) is a value (aluminance range) obtained by applying the ratio of the luminancedifference between Yhl and Yave to the luminance difference between Yhland Ysd to the dynamic range (DL) between the target bright luminancevalue and the target dark luminance value, and the dynamic range (DLsd)between the target average luminance value and the target dark luminancevalue (equation 5) is a value (a luminance range) obtained by applyingthe ratio of the luminance difference Yave and Ysd to the luminancedifference between Yhl and Ysd to the dynamic range (DL) between thetarget bright luminance value and the target dark luminance value.

The target bright luminance value (Ytarget_hl) and the target darkluminance value (Ytarget_sd) that are obtained by the equations 2 to 5and the target average luminance value (Ytarget) inputted from the inputdevice 2 are fed to the corrected value calculating circuit 15.

As described in the foregoing, the target average luminance value(Ytarget) becomes a corrected value of the average luminance value(Yave) obtained from the face image portion. The target bright luminancevalue (Ytarget_hl) becomes a corrected value of the bright luminancevalue (Yhl) obtained from the face image portion, and the target darkluminance value (Ytarget_sd) becomes a corrected value of the darkluminance value (Ysd) obtained from the face image portion.

FIG. 6 shows the structure of the look-up table, and FIG. 7 shows acorrespondence between the average luminance value (Yave) and the targetaverage luminance value (Ytarget_ave), a correspondence between thebright luminance value (Yhl) and the target bright luminance value(Ytarget_hl), and a correspondence between the dark luminance value(Ysd) and the target dark luminance value (Ytarget_sd) using the inputluminance value to enter the horizontal axis and using the outputluminance value (corrected luminance value) to enter the vertical axis.In the present embodiment, the lowest input luminance value “0” and thehighest input luminance value “255” shall not be corrected (inputluminance value=output luminance value).

Assuming that the luminance value is represented by eight bits, the fiveoutput luminance values (corrected values) (0, Ytarget_sd, Ytarget_ave,Ytarget_hl, and 255) respectively corresponding to the five inputluminance values (0, Ysd, Yave, Yhl, and 255) out of the input luminancevalues at 256 levels from 0 to 255 are determined by the foregoingprocessing. Output luminance values (corrected values) respectivelycorresponding to the input luminance values other than the five inputluminance values (0, Ysd, Yave, Yhl, and 255) are then calculated.

The output luminance values (corrected values) respectivelycorresponding to the input luminance values other than theabove-mentioned five input luminance values are calculated byinterpolation processing. It is possible to use as the interpolationprocessing a spline interpolation method, a nearest neighbor method, aby-linear method, a by-cubic method, etc. FIG. 8 shows an example (aluminance conversion curve, a gray-scale curve) in which the five points(the respective five correspondences between the input luminance valuesand the output luminance values) shown in FIG. 7 by a three-dimensionalspline interpolation method. By the interpolation processing, thelook-up table shown in FIG. 6 stores the output luminance values(corrected values) corresponding to all the input luminance values 0 to255.

The output luminance values (corrected values) corresponding to all theinput luminance values 0 to 255 (the look-up table) are outputted fromthe corrected value calculating circuit (look-up table creating circuit)15, and are inputted to the image correcting circuit 16. The imagecorrecting circuit 16 subjects the image data read out of the storagedevice 4 to luminance correction using the look-up table. Theluminance-corrected image data is outputted from the image correctingcircuit 16 (the image correcting apparatus 1).

In the image correcting apparatus 1 according to the present embodiment,the five input luminance values, including the bright luminance value,the dark luminance value, and the average luminance value relating tothe face image portion, and the output luminance values respectivelycorresponding to the five input luminance values are thus calculated, tocreate the look-up table (the luminance conversion curve, the gray-scalecurve) by the interpolation processing on the basis of the respectivefive correspondences between the input luminance values and the outputluminance values. The created look-up table is used, to subject theinput image data to luminance correction. With respect to the face imageportion included in the input image, the bright luminance value, thedark luminance value, and the average luminance value are accuratelycorrected, respectively, to the target luminance values (the targetbright luminance value, the target dark luminance value, and the targetaverage luminance value). By making the luminance conversion curveobtained by the interpolation processing smooth (using thethree-dimensional spline interpolation method, for example), pixelshaving the luminance values other than the bright luminance value, thedark luminance value, and the average luminance value relating to theface image portion can be also respectively corrected to luminancevalues meeting a target (a user's taste), thereby making it possible toobtain an image after correction having hue, saturation, lightness thatmeet the user's taste.

Furthermore, the look-up table (luminance conversion curve) for definingluminance correction in the present embodiment is created such that notonly the high contrast (low contrast) of the face image portion but alsothe high contrast (low contrast) of the entire image is not extremelychanged (the luminance correction curve having a smooth curve can beobtained by the interpolation processing). Therefore, the high contrast(low contrast) of the entire image including the face image portion canbe prevented from being extremely changed from the high contrast (lowcontrast) of the input image.

As can be seen from the foregoing equations 2 to 5, the target brightluminance value (Ytarget_hl) and the target dark luminance value(Ytarget_sd) are set depending on the inputted dynamic range (DL)between the target bright luminance value and the target dark luminancevalue. A large value may be inputted as the inputted dynamic range (DL)between the target bright luminance value and the target dark luminancevalue when the face image portion is corrected to high contrast (hardgradation), while a small value may be inputted as the inputted dynamicrange (DL) between the target bright luminance value and the target darkluminance value when the face image portion is corrected to low contrast(soft gradation).

Although in the above-mentioned embodiment, (input luminance value,output luminance value)=(0, 0), (dark luminance value (Ysd), target darkluminance value (Ytarget_sd)), (average luminance value (Yave), targetaverage luminance value (Ytarget)), (bright luminance value (Yhl),target bright luminance value (Ytarget_hl)) and (255, 255) are used asfive points used for the interpolation processing (see FIGS. 7 and 8),(input luminance value, output luminance value)=(0, 0) may be replacedwith (input luminance value, output luminance value)=(dark luminancevalue relating to the entire image (Ysd_all), 0), and (input luminancevalue, output luminance value)=(255, 255) may be replaced with (inputluminance value, output luminance value)=(bright luminance valuerelating to the entire image (Yhl_all), 255). For example, a histogrambased on the luminance values in the entire image is calculated. In thehistogram, a luminance value that accounts for 0.3% of the total areafrom the largest luminance value is taken as a dark luminance valuerelating to the entire image (Ysd_all), and a luminance value thataccounts for 1% of the total area from the smallest luminance value istaken as a bright luminance value relating to the entire image(Yhl_all). FIG. 9 shows a luminance conversion curve obtained byreplacing (0, 0) and (255, 255) with (dark luminance value relating tothe entire image (Ysd_all), 0) and (bright luminance value relating tothe entire image (Yhl_all), 255).

Respective histograms for RGB values may be calculated with respect tothe input image, to find, with respect to each of the three histograms,a value that accounts for 0.3% of the total area from the largest value,and to take a luminance value relating to the pixel taking the largestvalue as the bright luminance value relating to the entire image(Yhl_all).

Although in the above-mentioned embodiment, the dynamic range (DLhl)between the target bright luminance value and the target averageluminance value and the dynamic range (DLsd) between the target averageluminance value and the target dark luminance value are calculated usingthe dynamic range (DL) between the target bright luminance value and thetarget dark luminance value that are inputted from the input device 2 inthe equations 4 and 5, the dynamic range (DLhl) between the targetbright luminance value and the target average luminance value may beinputted from the input device 2 in place of input of the dynamic range(DL) between the target bright luminance value and the target darkluminance value, to calculate the dynamic range (DLsd) between thetarget average luminance value and the target dark luminance value usingthe inputted dynamic range (DLhl) between the target bright luminancevalue and the target average luminance value. In this case, the dynamicrange (DLsd) between the target average luminance value and the targetdark luminance value is calculated by the following equation 6:

DLsd=DLhl·(Yhl−Yave)/(Yave−Ysd)  equation 6

-   -   DLsd: Dynamic range between target average luminance value and        target dark luminance value    -   DLhl: Dynamic range between target bright luminance value and        target average luminance value        -   Yhl: Bright luminance value    -   Yave: Average luminance value        -   Ysd: Dark luminance value

Of course, the dynamic range (DLhl) between the target bright luminancevalue and the target average luminance value may be calculated using theinputted dynamic range (DLsd) between the target average luminance valueand the target dark luminance value in such a manner that the dynamicrange (DLsd) between the target average luminance value and the targetdark luminance value is inputted from the input device 2.

In the above-mentioned embodiment, when the dynamic range (DL) betweenthe target bright luminance value and the target dark luminance valuethat is inputted from the input device 2 by the operator of the digitalprinting system is an extremely large value (range), the slope of theluminance conversion curve corresponding to the luminance value relatingto the face image portion is extremely large, so that a hue differencein the face image portion after correction may, in some case, be large(a color becomes worse). Preferably, restrictions may be put on thedynamic range (DL) between the target bright luminance value and thetarget dark luminance value that is inputted from the input device 2 bythe following equation 7:

DL=DL(Rtarget−Btarget)/(Rave−Bave)  equation 7

Here, Rtarget, Btarget, Rave, and Bave respectively indicate a target Rvalue (set value) relating to the face, a target B value (set value)relating to the face, an average of R values of the pixels composing theface image portion, an average of B values of the pixels composing theface image portion. DL indicates the maximum range of a settable dynamicrange. The restricted dynamic range DL between the target brightluminance value and the target dark luminance value (hereinafterreferred to as restricted dynamic range) is used for calculating, when(Rave−Bave)>(Rtarget−Btarget), and the inputted dynamic range (DL)between the target bright luminance value and the target dark luminancevalue is more than the restricted dynamic range DL, the bright luminancevalue (Yhl) and the dark luminance value (Ysd) in place of the inputteddynamic range (DL) between the target bright luminance value and thetarget dark luminance value. When (Rave−Bave)≦≦(Rtarget−Btarget), andthe inputted dynamic range (DL) between the target bright luminancevalue and the target dark luminance value is not more than therestricted dynamic range DL, the inputted dynamic range (DL) between thetarget bright luminance value and the target dark luminance value isused as it is for calculating the bright luminance value (Yhl) and thedark luminance value (Ysd).

It may be judged by calculation whether or not(Rave−Bave)>(Rtarget−Btarget) with respect to the image data aftercorrection, to use, when (Rave−Bave)>(Rtarget−Btarget) and the inputteddynamic range (DL) between the target bright luminance value and thetarget dark luminance value is more than the restricted dynamic rangeDL, the restricted dynamic range DL in place of the inputted dynamicrange (DL) between the target bright luminance value and the target darkluminance value to calculate the target bright luminance value(Ytarget_hl) and the target dark luminance value (Ytarget_sd) again tomake image correction (creation of the look-up table) again.

Although in the above-mentioned example, restrictions are put on thedynamic range DL between the target bright luminance value and thetarget dark luminance value that is inputted from the input device 2 bypaying attention to the hue difference in the face image portion aftercorrection (equation 7), it goes without saying that restrictions may beput on the dynamic range DL by paying attention to a saturationdifference in the face image portion after correction or a brightnessrepresentative of the face image portion after correction in place ofthe hue difference.

A part or the whole of processing of a hardware circuit constituting theimage correcting apparatus 1 may be realized by a program.

Second Embodiment

FIG. 10 is a block diagram showing the configuration of a digitalprinting system according to a second embodiment. The digital printingsystem comprises an image correcting apparatus 10, and peripheralequipment (an input device 2, a display device 3, a storage device 4,and a printer 5) connected to the image correcting apparatus 10. FIG. 11is a block diagram showing the detailed electrical configuration of theimage correcting apparatus 10 that is a core apparatus in the digitalprinting system, together with the flow of data. In FIG. 10, the samecomponents as those shown in FIG. 1 are assigned the same referencenumerals. In FIG. 11, the same components as those shown in FIG. 2 areassigned the same reference numerals.

The image correcting apparatus 10 is an apparatus for subjecting fedimage data to luminance correction such that the brightness (luminance)of a portion representing the face of a character included in an imagerepresented by the image data (hereinafter referred to as a face imageportion) has brightness (luminance) conforming to a target luminancevalue to be set. As described later, the image correcting apparatus 10according to the second embodiment has the function of newlydetermining, when a predicted noise amount that may be included in imagedata representing the face image portion after luminance correctionexceeds a predetermined noise amount (when it is estimated to exceed thenoise amount), a target luminance value such that the predicted noiseamount that may be included in the image data representing the faceimage portion after luminance correction will not exceed thepredetermined noise amount.

The input device 2 (a keyboard, a mouse, etc.) connected to the imagecorrecting apparatus 10 is used for input of a target average luminancevalue, an allowable noise amount, etc. (the target average luminancevalue and the allowable noise amount will be described later). On adisplay screen of the display device 3, a screen for setting the targetaverage luminance value inputted from the input device 2, imagesrepresented by image data before and after correction, and so forth aredisplayed. The storage device (a hard disk, a memory card, a CD-ROM,etc.) 4 stores image data. The image data read out of the storage device4 is subjected to image correction processing in the image correctingapparatus 10. The printer 5 prints the image represented by the imagedata after correction on printing paper or the like.

The image correcting apparatus 10 comprises a face area partitioningcircuit 11, a noise amount calculating circuit 21, an average luminancevalue calculating circuit 13, a target average luminance valuedetermining circuit 22, a correction coefficient calculating circuit 23,and an image correcting circuit 24.

The image data read out of the storage device 4 connected to the imagecorrecting apparatus 10 is subjected to luminance correction in theimage correcting circuit 24. The luminance correction processingperformed in the image correcting circuit 24 conforms to a correctionfunction that defines a correspondence between an input luminance valueand an output luminance value (corrected value). A coefficient of thecorrection function used for luminance correction in the imagecorrecting circuit 24 is calculated in the correction coefficientcalculating circuit 23.

First, description is made of processing of the face area partitioningcircuit 11, the noise amount calculating circuit 21, and the averageluminance value calculating circuit 13. Calculation processing of anoise amount included in the face image portion and calculationprocessing of the average luminance value relating to the face imageportion are performed by the face area partitioning circuit 11, thenoise amount calculating circuit 21, and the average luminance valuecalculating circuit 13.

An image represented by image data to be subjected to correctionprocessing shall include an image representing the face of a character(a face image). The image data representing the image including the faceimage is read out of the storage device 4.

The image data read out of the storage device 4 (hereinafter referred toas input image data) is inputted to each of the face area partitioningcircuit 11, the noise amount calculating circuit 21, and the averageluminance value calculating circuit 13.

The face area partitioning circuit 11 is a circuit for partitioning offthe face image portion included in the image represented by the inputtedimage data (hereinafter referred to as input image) from the other imageportion (for detecting the face image portion or defining a boundary),as in the above-mentioned first embodiment.

The face area information outputted from the face area partitioningcircuit 11 is inputted to each of the noise amount calculating circuit21 and the average luminance value calculating circuit 13.

The noise amount calculating circuit 21 calculates a noise amount in theface image portion included in the input image. As described above, theinput image data representing the input image including the face imageportion is fed to the noise amount calculating circuit 21 from thestorage device 4. The area position of the face image portion includedin the input image is specified by the face area information outputtedfrom the face area partitioning circuit 11.

Generally, noise in the image appears as a high-frequency areacomponent. The noise amount calculating circuit 21 filters each ofpixels composing the face image portion using a high-pass filter, tofind a high-frequency area component for each of the pixels composingthe face image portion. For example, pixel filters in three rows bythree columns shown in FIG. 12 are used for the high-pass filtering.

The high-frequency area component found for each of the pixels composingthe face image portion is used, to calculate a dispersion value σ². Thecalculated dispersion value σ² is handled as the noise amount in theface image portion included in the input image.

The average luminance value calculating circuit 13 calculates an averageof the luminance values for the pixels composing the face image portionincluded in the input image. The calculated average is an averageluminance value (Yave). The average luminance value (Yave) is calculatedby the foregoing equation 1.

When the image data fed to the average luminance value calculatingcircuit 13 is represented by an RGB value (anti-logarithm) for each ofthe pixels, a luminance value Y for each of the pixels is calculated bythe following equation 8 prior to calculating the average luminancevalue (Yave). This is also the same in the first embodiment.

Y=0.2126·R+0.7152·G+0.0722·B  equation 8

Processing of the target average luminance value determining circuit 22will be then described. The target average luminance determining circuit22 determines a target average luminance value to be given to thecorrection coefficient calculating circuit 23 (hereinafter referred toas a determination target average luminance value (Ytarget)). Thedetermination target average luminance value (Ytarget) determined in thetarget average luminance value determining circuit 22 becomes a valuewhich differs depending on a noise amount a 2 in the face image portioncalculated by the noise amount calculating circuit 21, as describedbelow.

As described above, the input device 2 is used by an operator of thedigital printing system so that a target average luminance value(Ytarget) and an allowable noise amount σ² (the maximum noise amountthat is not handled if noise is included) are inputted. The inputtedtarget average luminance value (Ytarget) and allowable noise amount σ²are fed to the target average luminance value determining circuit 22.Further, the average luminance value (Yave) calculated in the averageluminance value calculating circuit 13 is also inputted to the targetaverage luminance value determining circuit 22.

The target average luminance value determining circuit 22 calculates thedetermination target average luminance value (Ytarget) (a correctedvalue of the average luminance value (Yave)) by either one of thefollowing equations 9 and 10:

Determination target average luminance value( Ytarget)=target averageluminance value(Ytarget)(when σ≦σ(Yave/Ytarget))  equation 9

Determination target average luminance value( Ytarget)=average luminancevalue(Yave)·σ/σ(when σ>σ(Yave/Ytarget))  equation 10

Here, σ and σ respectively indicate a square root of the noise amount σ²in the face image portion and a square root of the allowable noiseamount σ ². Both the square root a of the noise amount σ² in the faceimage portion and the square root σ of the allowable noise amount σ² arerespectively used as values representing the magnitude of the noiseamount.

In the equations 9 and 10, an equation including an inequality sign putin parentheses is used for judging whether or not a noise amount thatmay be included in the face image portion in a case where luminancecorrection is made exceeds a noise amount to be allowed. An equationincluding an inequality sign will be described below.

When an image is corrected to higher brightness (when the luminancevalue of image data is corrected to a higher value), noise recognized inthe image after correction is increased. When the image is corrected tolower brightness, noise recognized in the image after correction isdecreased. Considering that the magnitude of luminance correction andthe variation in a noise amount are proportional to each other, lettingΣ² be a predicted value of the noise amount in the face image portion (apredicted noise amount:a predicted dispersion value) in a case where itis assumed that luminance correction is made, a square root Σ of thepredicted noise amount Σ² is expressed by the following equation 11:

Σ=(Ytarget/Yave)·σ  equation 11

-   -   Σ: Square root of predicted noise amount    -   Ytarget: Target average luminance value        -   Yave: Average luminance value            -   σ: Square root of noise amount in face image portion

Considering that the square root Σ of the predicted noise amount Σ² inthe face image portion in a case where luminance correction is made isnot more than the square root σ of the allowable noise amount σ² , aninequality in the following equation 12 holds:

Σ≦σ  equation 12

When the equations 11 and 12 are integrated into one equation, aconditional expression put in parentheses in the equation 9 holds. Aconditional expression put in parentheses in the equation 10 holds inaccordance with the conditional expression put in parentheses in theequation 9.

Simply, it can be (of course, it may be) also judged by comparing thenoise amount σ² (or its square root a) in the face image portioncalculated by the noise amount calculating circuit 21 with the allowablenoise amount σ² (or its square root σ) to be set whether or not thenoise amount σ² (or its square root σ) in the face image portion exceedsthe allowable noise amount σ² (or its square root σ). Alternatively, itcan be (of course, it may be) also judged by comparing the predictednoise amount Σ² (or its square root Σ) in the face image portion withthe allowable noise amount σ² (or its square root σ) to be set whetheror not the predicted noise amount Σ² (or its square root Σ) in the faceimage portion exceeds the allowable noise amount σ² (or its square rootσ). By using the conditional expressions that hold on the basis of theforegoing equations 11 and 12, the conditions (equation 12) under whichthe square root Σ of the predicted noise amount Σ² in the face imageportion in a case where luminance correction is made is not more thanthe square root σ of the allowable noise amount σ² can be judged usingthe square root σ of the noise amount σ² in the face image portion, thesquare root σ of the allowable noise amount σ² , the average luminancevalue (Yave), and the target average luminance value (Ytarget). Arelatively accurate noise amount can be judged by paying attention tothe noise amount in the face image portion after luminance correction.

When it is judged that the noise amount in the face image portion thatis predicted after luminance correction is not more than the allowablenoise amount (the inequality in the equation 9 holds), the targetaverage luminance value (Ytarget) inputted from the input device 2 isconsidered to be a determination target average luminance value(Ytarget) (equation 9). The determination target average luminance value(Ytarget) (the same luminance value as the inputted target averageluminance value (Ytarget)) is outputted from the target averageluminance determining circuit 22.

It is judged that the noise amount in the face image portion that ispredicted after luminance correction exceeds the allowable noise amount(the inequality in the equation 10 holds), the determination targetaverage luminance value (Ytarget) having a value different from thetarget average luminance value (Ytarget) inputted from the input device2 is calculated on the basis of the equation 10.

The equation 10 is a mathematical expression obtained by substitutingthe right side in the equation 12 into the left side in the equation 11.By the equation 10, such a determination target average luminance value(Ytarget) that the noise amount in the face image portion aftercorrection is the same as the allowable noise amount (hereinafterreferred to as a limited noise amount) is calculated. The determinationtarget average luminance value (Ytarget) calculated in a case where itmeets the conditional expression put in parentheses in the equation 10takes a smaller value than the inputted target average luminance value(Ytarget). The degree to which the target average luminance value(Ytarget) to be determined is smaller than the inputted target averageluminance value (Ytarget) varies depends on the allowable noise amountσ² previously set and the noise amount σ² included in the face imageportion calculated by the noise amount calculating circuit 21. Generallyin a case where the face image portion is corrected to higherbrightness, such an allowable noise amount σ² that is not made as smallas possible from the inputted target average luminance value (Ytarget)will be set.

The calculated luminance value is outputted as the determination targetaverage luminance value (Ytarget) from the target average luminancevalue determining circuit 22.

The determination target average luminance value (Ytarget) outputtedfrom the target average luminance value determining circuit 22 is fed tothe correction coefficient calculating circuit 23. The correctioncoefficient calculating circuit 23 calculates a coefficient (correctioncoefficient α) in a relational expression between an input luminancevalue and an output luminance value (corrected luminance value) on thebasis of the following equation 13:

α= Ytarget/Yave  equation 13

-   -   α: Correction coefficient    -   Ytarget: Determination target average luminance value        -   Yave: Average luminance value

The correction coefficient α calculated in the correction coefficientcalculating circuit 23 is inputted to the image correcting circuit 24.The image correcting circuit 24 subjects the image data read out of thestorage device 4 to luminance correction for each pixel on the basis ofa correction function using the correction coefficient α. The correctionfunction used for the luminance correction in the image correctingcircuit 24 is expressed by the following equation 14:

Output luminance value=α·input luminance value  equation 14

FIG. 13 shows a graph of the correction function expressed by theequation 14 using the input luminance value to enter its horizontal axisand using the output luminance value (corrected value) to enter itsvertical axis. In the graph (a luminance conversion straight line) shownin FIG. 13, a one-dot and dash line and a solid line respectivelyindicate an example of a correction function in a case where thepredicted noise amount in the face image portion after luminanceconversion is not more than the allowable noise amount (the case of theequation 9) and an example of a correction function in a case where thepredicted noise amount in the face image portion after luminanceconversion exceeds the allowable noise amount (the case of the equation10). ◯ and  respectively indicate a corresponding point between theaverage luminance value (Yave) and the determination target averageluminance value (the same value as the inputted target average luminancevalue (Ytarget)) in a case where the predicted noise amount in the faceimage portion after luminance conversion is not more than the allowablenoise amount and a corresponding point between the average luminancevalue (Yave) and the determination target average luminance value(Ytarget) in a case where the predicted noise amount in the face imageportion after luminance conversion exceeds the allowable noise amount.In the graph shown in FIG. 13, the luminance value (the input luminancevalue and the output luminance value) is represented at 256 levels from0 to 255 levels by 8-bit data.

In the image correcting apparatus 10, when the noise amount in the faceimage portion predicted in a case where the luminance of the imageincluding the face image portion is corrected on the basis of theinputted target average luminance value exceeds the allowable noiseamount (equation 10), such a new target average luminance value(determination target average luminance value) that the noise amount inthe face image portion after correction takes the same value as theallowable noise amount. The input image data is corrected by acorrection function conforming to the calculated determination targetaverage luminance value. A face image portion after correction in whichnoise is inconspicuous can be reliably obtained. Of course, when thereis little noise in the image data representing the face image portion(the case of the equation 9), luminance correction meeting a user'srequest (whether the face image portion after correction is made brightor dark). It is possible to make luminance correction considering both auser's request for a noise amount and a user's request for luminancecorrection.

Although in the above-mentioned embodiment, a numerical value (luminancevalue) is inputted as the target average luminance value (Yave), inputs“somewhat bright” and “somewhat dark” may be, of course, provided fromthe input device 2. In this case, a relatively large numerical value isset as the target average luminance value (Yave) in correspondence withthe input “somewhat bright”, while a relatively small numerical value isset as the target average luminance value (Yave) in correspondence withthe input “somewhat dark”. The target average luminance value (Yave) tobe set is previously stored in a memory in the target average luminancevalue determining circuit 22. Further, “somewhat large”, “somewhatsmall”, etc. may be also similarly set with respect to theabove-mentioned allowable noise amount a σ² . The same is true for amodified example, described later.

The correction coefficient α given to the image correcting circuit 24 iscalculated using the image data (original image data) read out of thestorage device 4 in the above-mentioned embodiment. The correctioncoefficient α may be calculated on the basis of reduced image dataobtained by reducing the original image data in place of the originalimage data. In this case, a reducing circuit for reducing the originalimage data is provided in the image correcting apparatus 10. The facearea partitioning circuit 11, the noise amount calculating circuit 21,the average luminance value calculating circuit 13, and the correctioncoefficient calculating circuit 23 respectively perform processing onthe basis of the reduced image data. The image correcting circuit 24subjects the original image data to luminance correction in accordancewith the correction function defined by the correction coefficient αobtained using the reduced image data. The same is true for calculationof a corrected value (a look-up table) found in the modified example,described below.

Modified Example

FIG. 14 illustrates the electrical configuration of an image correctingapparatus 10A in the modified example of the second embodiment. Theimage correcting apparatus 10A differs from the image correctingapparatus 10 shown in FIG. 11 in that a corrected value calculatingcircuit (a look-up table creating circuit) 25 is provided in place ofthe correction coefficient calculating circuit 23.

In the above-mentioned second embodiment, the input image data issubjected to luminance correction on the basis of the correctionfunction (equation 14) (the luminance conversion straight line) usingthe correction coefficient α calculated in the correction coefficientcalculating circuit 23 (see FIG. 13). In the modified example,respective correspondences (a luminance conversion curve) between allinput luminance values and output luminance values corresponding theretoare obtained by interpolation processing in place of the luminancecorrection based on the correction function (equation 14) (the luminanceconversion straight line) using the correction coefficient α.

The corrected value calculating circuit (look-up table creating circuit)25 is a circuit utilizing respective correspondences between a pluralityof (e.g., three) input luminance values and output luminance values thatare previously obtained to calculate output luminance valuescorresponding to other input luminance values by interpolationprocessing (creating a look-up table (LUT)). As described above, in atarget average luminance determining circuit 22, a correspondencebetween an average luminance value (Yave) that is one of the inputluminance values and a determination target average luminance value(Ytarget) that is the output luminance value corresponding to theaverage luminance value (Yave) is obtained. In this modified example, acorrespondence using the lowest luminance value as it is as a lowestluminance value and using the highest luminance value as it is as ahighest luminance value is used as the other correspondence between theinput luminance value and output luminance value, which is previouslyobtained. The lowest luminance value and the highest luminance value maybe the lowest and highest luminance values (e.g., 0 and 255 in the caseof 256 levels from 0 to 255) that can be taken as luminance values.Alternatively, the lowest and highest luminance values out of theluminance values for pixels in the input image may be the lowest andhighest luminance values that can be taken as luminance values.

In the corrected value calculating circuit (look-up table creatingcircuit) 25, the output luminance values (corrected value) correspondingto the input luminance values other than the above-mentioned three inputluminance values are calculated by interpolation processing. It ispossible to utilize, as the interpolation processing, a splineinterpolation method, a nearest neighbor method, a by-linear method, aby-cubic method, etc. FIG. 15 illustrates a luminance conversion curve(gray-scale curve) obtained by a two-dimensional spline interpolationmethod. A one-dot and dash line and a solid line respectively indicate aluminance conversion curve based on a corrected value (a look-up table)obtained when a predicted noise amount in a face image portion afterluminance correction is not more than a allowable noise amount and aluminance conversion curve based on a corrected amount (a look-up table)obtained in a case where the predicted noise amount in the face imageportion after luminance correction exceeds the allowable noise amount.

Although the present invention has been described and illustrated indetail, it is clearly understood that the same is by way of illustrationand example only and is not to be taken by way of limitation, the spiritand scope of the present invention being limited only by the terms ofthe appended claims.

1-16. (canceled)
 17. An image correcting apparatus comprising:representative luminance value calculation means for calculating arepresentative luminance value in a particular image included in animage represented by fed image data; noise amount calculation means forcalculating a noise amount included in particular image datarepresenting the particular image; target luminance value determinationmeans for determining a target luminance value depending on the noiseamount calculated by the noise amount calculation means; means forproducing data representing a luminance conversion straight line or aluminance conversion curve such that the represented luminance valuecalculated by the representative luminance value calculation means iscorrected to the target luminance value determined by the targetluminance value determination means; and luminance correction means forcorrecting the luminance of at least the particular image datarepresenting the particular image on the basis of the produced datarepresenting the luminance conversion straight line or the luminanceconversion curve.
 18. The image correcting apparatus according to claim17, comprising desired target luminance value input means for acceptinginput of a desired target luminance value, and predicted noise amountcalculation means for calculating a predicted noise amount that may beincluded in the particular image data after luminance correction on thebasis of the representative luminance value calculated by therepresentative luminance value calculation means, the desired targetluminance value inputted by the target luminance value input means, andthe noise amount calculated by the noise amount calculation means, thetarget luminance value determination means determining the targetluminance value depending on the predicted noise amount calculated bythe predicted noise amount calculation means.
 19. The image correctingapparatus according to claim 17, wherein the target luminance valuedetermination means determines, on the basis of an allowable noiseamount for noise that may be included in the particular image data afterluminance correction and the calculated noise amount or the calculatedpredicted noise amount, that are previously set or inputted, the targetluminance value such that the noise amount or the predicted noise amountis not more than the allowable noise amount.
 20. The image correctingapparatus according to claim 18, wherein the target luminance valuedetermination means determines the desirable target luminance valueinputted from the desirable target luminance value input means as thetarget luminance value when the calculated predicted noise amount is notmore than the allowable noise amount, and calculates, when thecalculated predicted noise amount exceeds the allowable noise amount,such a new target luminance value that the predicted noise amount is thesame as the allowable noise amount on the basis of the representativeluminance value, the allowable noise amount, and the noise amount, anddetermines the calculated new target luminance value as the targetluminance value.
 21. The image correcting apparatus according to claim17, wherein said particular image is an image representing the face of acharacter.
 22. The image correcting apparatus according to claim 17,wherein the representative luminance value is the average luminancevalue in the particular image.
 23. An image correcting method comprisingthe steps of: calculating a representative luminance value in aparticular image included in an image represented by fed image data;calculating a noise amount included in particular image datarepresenting the particular image; determining a target luminance valuedepending on the calculated noise amount; producing data representing aluminance conversion straight line or a luminance conversion curve suchthat the calculated representative luminance value is corrected to thedetermined target luminance value; and correcting the luminance of atleast the particular image data representing the particular image on thebasis of the produced data representing the luminance conversionstraight line or the luminance conversion curve.
 24. A program forcausing a computer to carry out the procedures for: calculating arepresentative luminance value in a particular image included in animage represented by fed image data; calculating a noise amount includedin particular image data representing the particular image; determininga target luminance value depending on the calculated noise amount;producing data representing a luminance conversion straight line or aluminance conversion curve such that the calculated representativeluminance value is corrected to the determined target luminance value;and correcting the luminance of at least the particular image datarepresenting the particular image on the basis of the produced datarepresenting the luminance conversion straight line or the luminanceconversion curve.